<template>
  <div class="all">
    <!-- 头部 -->
    <row-vet></row-vet>

    <div class="dingtoubox">
      <van-image round width="2.5rem" height="2.5rem" src="https://img.yzcdn.cn/vant/cat.jpeg" />
      <div class="fr">
        <span class="uname">用户名：{{myname}}</span>
        <br />
        <span class="lv">信用等级：{{level}}</span>
        <van-icon name="gem" color="#fff" />
        <div class="zhanghu">
          <van-icon name="setting" />账户设置
        </div>
      </div>
      <div class="dibox">
        <van-icon name="medal" color="#FFD700" />
        <span class="dibox-1">PLUS</span>
        <span class="dibox-l">免费使用</span>
        <span class="dibox-2">立领1张运费卷</span>
        <span class="dibox-r">0元试用</span>
      </div>
    </div>
    <van-notice-bar
      text="董事长晨晨虎2020年福利大放送,晨晨虎董事长金口承诺：长得帅送房，长得美送车，祝大家2020快快乐乐，提前祝各位愚人节快乐！！！"
      scrollable
      left-icon="volume-o"
      background="null"
    />
    <van-grid>
      <van-grid-item icon="pending-payment" text="待付款" @click="fukuan" />
      <van-grid-item icon="logistics" text="待收货" />
      <van-grid-item icon="phone-o" text="退货/售后" @click="shouhou" />
      <van-grid-item icon="balance-list-o" text="全部订单" />
    </van-grid>
    <van-grid :column-num="5">
      <van-grid-item icon="coupon-o" text="优购卷" />
      <van-grid-item icon="gold-coin-o" text="开通有礼" />
      <van-grid-item icon="new-arrival-o" text="新品上市" />
      <van-grid-item icon="comment-o" text="消息" />
      <van-grid-item icon="balance-o" text="我的资产" />
    </van-grid>
    <div class="xingqing">
      <div>
        <p>0</p>
        <p>商品收藏</p>
      </div>
      <div>
        <p>0</p>
        <p>店铺收藏</p>
      </div>
      <div>
        <p>0</p>
        <p>我的足迹</p>
      </div>
    </div>
    <van-grid>
      <van-grid-item icon="clock-o" text="我的预约" />
      <van-grid-item icon="chart-trending-o" text="优购股市" />
      <van-grid-item icon="apps-o" text="应用推荐" />
      <van-grid-item icon="scan" text="扫描识别" />
    </van-grid>
    <row-vit></row-vit>
  </div>
</template>

<script>
import myinfo from '../util/navigation'
import header from '../util/header'
export default {
  data() {
    return {
      myname: '搏虎的猫',
      level: '至尊VIP',
      username: ''
    }
  },
  created() {
    this.qidong()
  },
  computed: {},
  components: {
    'row-vit': myinfo,
    'row-vet': header
  },
  mounted() {},
  methods: {
    qidong() {
      this.username = window.localStorage.getItem('uname', this.username)
      if (this.username === null) {
        this.$router.push('/Login')
      }
    },
    fukuan() {
      this.$router.push('/order')
    },
    shouhou() {
      this.$toast('董事长热线：13196927003')
    }
  }
}
</script>

<style lang="less" scoped>
.title {
  background-color: #c73420;
  height: 1rem;
  .title_hm {
    line-height: 1rem;
    text-align: center;
    color: #ffffff;
    font-family: '微软雅黑';
    font-size: 0.5rem;
  }
}
.van-image {
  float: left;
}
.fr {
  float: left;
  margin: 20px 0 0 20px;
}
.dingtoubox {
  margin-top: 46px;
  position: relative;
  padding: 15px 0 0 15px;
  height: 130px;
  background-image: url('../../img/timg (2).jpg');
  background-size: cover;
  margin-bottom: 10px;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 10px 10px rgb(126, 111, 111);
}
.uname {
  font-size: 24px;
  color: #fff;
}
.lv {
  margin-top: 10px;
  color: #fff;
}
.zhanghu {
  color: #555;
  position: absolute;
  top: 5px;
  right: 10px;
}
.dibox {
  position: absolute;
  width: 300px;
  height: 25px;
  bottom: 0px;
  background-color: rgb(23, 19, 82);
  border-radius: 10px 10px 0 0;
  left: 50%;
  transform: translateX(-50%);
  line-height: 25px;
  padding: 0 15px;
}
.dibox span {
  color: #ffd700;
}
.dibox-1 {
  padding-left: 5px;
  padding-right: 10px;
  border-right: 1px solid #ffd700;
}
.dibox-l {
  padding-left: 28px;
}
.dibox-2 {
  padding-left: 10px;
}
.dibox-r {
  float: right;
}
.van-grid {
  margin-bottom: 10px;
  box-shadow: 0 10px 10px rgb(126, 111, 111);
}
.xingqing {
  display: flex;
  height: 74px;
  box-shadow: 0 10px 10px rgb(126, 111, 111);
  margin-bottom: 10px;
  div {
    padding-top: 10px;
    text-align: center;
    line-height: 15px;
    flex: 1;
    float: left;
  }
}
.van-notice-bar {
  margin-bottom: 10px;
  box-shadow: 0 10px 10px rgb(126, 111, 111);
}
</style>
